<%@ page contentType="text/html;charset=UTF-8" %>

<!DOCTYPE html>
<html>
<head>
	<title>模块管理</title>
	 <%@ include file="/common/meta.jsp" %>
	<%@ include file="/common/import.jsp" %>
	
	<script type="text/javascript">
		$(function(){
			$('#unitSaveForm').form({
				 onSubmit:function(){		    	
			    	return $(this).form('validate');
			    },
			    success:function(data){
			    	var result = jQuery.parseJSON(data);
			    	if(result.flag=='T'){
			    		$.messager.alert('提交结果', '操作成功!', 'info',function(){
			    			$('#unitId').val(result.msg);
				    		parent.closeAdd();
				    		parent.reload();
			    		});
			    	}else{
			    		$.messager.alert('提交结果', '操作失败', 'error');
			    	}        
			    }
			});
		});
	</script>

<body>	

	<form id="unitSaveForm" name="unitSaveForm" method="post" action="save.action">
		<input type="hidden" name="formToken" id="formToken" value="${formToken}"/>
		<input type="hidden" name="isAdd" value="${isAdd}"/>
		<input type="hidden" name="unitId" id="unitId" value="${item.unitId}"/>
		<input type="hidden" name="fatherId" id="fatherId" value="${item.fatherId}"/>
		<input type="hidden" name="sysEname" id="sysEname" value="${item.sysEname}"/>
		
		<table class="datagrid-body" >
			<tr>
				<td class="datagrid-header">所属应用</td>
				<td>${item.sysEname}			
				</td>
			</tr>
			<tr >
				<td class="datagrid-header">模块名称<font color="red">*</font></td>
				<td>
				<input name="unitCname"  id="unitCname" value="${item.unitCname}"
				class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" size="30" 
				missingMessage="请输入名称" invalidMessage="应为2~30个字" />				
				</td>
			</tr>
			<tr>
				<td class="datagrid-header">模块标识<font color="red">*</font></td>
				<td>
				<input id="unitEname" name="unitEname"  value="${item.unitEname}"
				class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" size="30" " 
				missingMessage="请输入字符串作为标识" invalidMessage="应为2~30个字" />
				</td>
			</tr>
			
			<!-- 
			<tr>
			
				<td class="datagrid-header">状态</td>
				<td>
				<select id="unitStatus" name="unitStatus">
					<option value="1">启用</option>
					<option value="0">禁用</option>				
				</select>
				
				</td>
			</tr>
			 -->
				<tr>
				<td class="datagrid-header"></td>
				<td >
					<a href="#" class="easyui-linkbutton" iconCls="icon-save" onclick="$('#unitSaveForm').submit();">提交</a>	
					<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="parent.closeAdd();"; >取消</a>		
				</td>
			</tr>
			
		</table>
		
	</form>
</body>
</html>